/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "DatalinkReportingConfiguration.h"

namespace oai::udr::model {

DatalinkReportingConfiguration::DatalinkReportingConfiguration() {
  m_DddTrafficDesIsSet = false;
  m_Dnn = "";
  m_DnnIsSet = false;
  m_SliceIsSet = false;
  m_DddStatusListIsSet = false;
}

DatalinkReportingConfiguration::~DatalinkReportingConfiguration() {}

void DatalinkReportingConfiguration::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const DatalinkReportingConfiguration &o) {
  j = nlohmann::json();
  if (o.dddTrafficDesIsSet() || !o.m_DddTrafficDes.empty())
    j["dddTrafficDes"] = o.m_DddTrafficDes;
  if (o.dnnIsSet())
    j["dnn"] = o.m_Dnn;
  if (o.sliceIsSet())
    j["slice"] = o.m_Slice;
  if (o.dddStatusListIsSet() || !o.m_DddStatusList.empty())
    j["dddStatusList"] = o.m_DddStatusList;
}

void from_json(const nlohmann::json &j, DatalinkReportingConfiguration &o) {
  if (j.find("dddTrafficDes") != j.end()) {
    j.at("dddTrafficDes").get_to(o.m_DddTrafficDes);
    o.m_DddTrafficDesIsSet = true;
  }
  if (j.find("dnn") != j.end()) {
    j.at("dnn").get_to(o.m_Dnn);
    o.m_DnnIsSet = true;
  }
  if (j.find("slice") != j.end()) {
    j.at("slice").get_to(o.m_Slice);
    o.m_SliceIsSet = true;
  }
  if (j.find("dddStatusList") != j.end()) {
    j.at("dddStatusList").get_to(o.m_DddStatusList);
    o.m_DddStatusListIsSet = true;
  }
}

std::vector<DddTrafficDescriptor> &
DatalinkReportingConfiguration::getDddTrafficDes() {
  return m_DddTrafficDes;
}
void DatalinkReportingConfiguration::setDddTrafficDes(
    std::vector<DddTrafficDescriptor> const &value) {
  m_DddTrafficDes = value;
  m_DddTrafficDesIsSet = true;
}
bool DatalinkReportingConfiguration::dddTrafficDesIsSet() const {
  return m_DddTrafficDesIsSet;
}
void DatalinkReportingConfiguration::unsetDddTrafficDes() {
  m_DddTrafficDesIsSet = false;
}
std::string DatalinkReportingConfiguration::getDnn() const { return m_Dnn; }
void DatalinkReportingConfiguration::setDnn(std::string const &value) {
  m_Dnn = value;
  m_DnnIsSet = true;
}
bool DatalinkReportingConfiguration::dnnIsSet() const { return m_DnnIsSet; }
void DatalinkReportingConfiguration::unsetDnn() { m_DnnIsSet = false; }
Snssai DatalinkReportingConfiguration::getSlice() const { return m_Slice; }
void DatalinkReportingConfiguration::setSlice(Snssai const &value) {
  m_Slice = value;
  m_SliceIsSet = true;
}
bool DatalinkReportingConfiguration::sliceIsSet() const { return m_SliceIsSet; }
void DatalinkReportingConfiguration::unsetSlice() { m_SliceIsSet = false; }
std::vector<DlDataDeliveryStatus> &
DatalinkReportingConfiguration::getDddStatusList() {
  return m_DddStatusList;
}
void DatalinkReportingConfiguration::setDddStatusList(
    std::vector<DlDataDeliveryStatus> const &value) {
  m_DddStatusList = value;
  m_DddStatusListIsSet = true;
}
bool DatalinkReportingConfiguration::dddStatusListIsSet() const {
  return m_DddStatusListIsSet;
}
void DatalinkReportingConfiguration::unsetDddStatusList() {
  m_DddStatusListIsSet = false;
}

} // namespace oai::udr::model
